import React from 'react';
import { connect } from 'dva';
import styles from './reim.less'
import reimImg from '@/assets/image/dtimage/reim.png'
import downIcon from '../../assets/image/xl.svg'
class Reim extends React.Component {
  render() {
    const { travelReimTimes, travelReimTotalAmount, highestTravelReimType, highestTravelReimRate } = this.props
    return (
      <div className={styles.bg}>
        <img className={styles.downIcon} src={downIcon} alt='' />
        <div className={styles.box}>
          <div className={styles.title}>2019报销</div>
          <div className={styles.textBox}>
            <div>自2019.08.03起</div>
            <div>你提起过<span className={styles.textColor}>{travelReimTimes || ''}</span>次出差报销</div>
            <div>个人的实际报销费用达<span className={styles.textColor}>{Number(travelReimTotalAmount || '').toFixed(1)}</span>元</div>
            <div><span className={styles.textColor}>{highestTravelReimType || ''}</span>报销占比最大，达到了<span className={styles.textColor}>{Number((highestTravelReimRate || '') * 100).toFixed(1)}%</span></div>
            <div className={styles.border}></div>
            <div>吃饱睡足，才能元气满满的奋斗!</div>
          </div>
          <img className={styles.img} src={reimImg} alt=""></img>
        </div>
      </div>
    )
  }
}

export default connect(({ index }) => index.travel)(Reim)